﻿var currentText;

$(document).ready(function () {

    /*$('div.green-box:first').animate({
    left: '-=730'
    });*/
    currentText = 'moto-desc';
    $('#color-boxes > div >div').each(function () {
        $(this).mouseover(function () {
            var newTextBoxId = $(this).attr('class') + '-text';
            if (currentText == newTextBoxId) {
                return;
            }
            currentText = newTextBoxId;
            $('#moto-desc div').hide();
            $('#moto-desc').removeClass();
            $('#moto-desc').addClass($(this).attr('class'));
            $('#moto-desc div').html($('#' + newTextBoxId).html());
            $('#moto-desc div').fadeIn();
        });
    });
});      